<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <f:view beforePhase="#{touristViewMyFoodSageManagedBean.initView}" >
    <h:head>
        <title>View Tourist Details</title>
    </h:head>

    <h:body>
        <h:form id="viewTouristDetails">
            <!-- LOCALIZATION -->
            <!-- this selectedLocale menu must always be at the top of the form -->
            <h:selectOneMenu id="selectedLocale" value="#{indexManagedBean.selectedLocale}">
                <f:selectItem itemLabel="Select Language" itemValue="" />
                <f:selectItems value="#{enumLanguage.listItems}" />

                <p:ajax update="touristAccountDetail
                                statusMessages
                                tabTouristAccountInfo
                                tabTouristPersonalInfo
                                tabTouristItineraryInfo
                                accountTouristUsernameLabel
                                accountTouristCurrentPasswordLabel
                                accountTouristNameLabel
                                accountTouristGenderLabel
                                accountTouristBirthdateLabel
                                accountTouristCountryLabel
                                accountTouristLanguageLabel
                                myFoodsageEditButton" 
                        listener="#{indexManagedBean.selectedLocaleValueChangeListener}" />
            </h:selectOneMenu>
            <!-- this end selectedLocale menu must always be at the top of the form -->
            <!-- END LOCALIZATION -->
            
            <p:panel id="touristAccountDetail" header="#{bundle['myfoodsage.header.panel']}"  >
                <p:messages id="statusMessages" />
                
                <p:tabView id="tabViewTouristView" dynamic="false">

                    <p:tab id="tabTouristAccountInfo" title="#{bundle['myfoodsage.accountinfo.tab']}">
                        <h:panelGrid columns="3" cellpadding="5">
                            <h:outputLabel id="accountTouristUsernameLabel" value="#{bundle['myfoodsage.username.label']}" style="font-weight: bold"/>
                            <h:outputLabel id="username" value="#{touristViewMyFoodSageManagedBean.username}" />
                            <p:message for="username" />

                            <h:outputLabel id="accountTouristCurrentPasswordLabel" value="#{bundle['myfoodsage.currentpassword.label']}" style="font-weight: bold"/>
                            <h:outputText id="currpassword" value="******" />
                            <p:message for="currpassword" />

                            <h:outputLabel id="accountTouristLanguageLabel" value="#{bundle['myfoodsage.languagepreferred.label']}" style="font-weight: bold"/>
                            <h:outputText id="language" value="#{touristViewMyFoodSageManagedBean.language}" />
                            <p:message for="language" />
                        </h:panelGrid>
                    </p:tab>

                    <p:tab id="tabTouristPersonalInfo" title="#{bundle['myfoodsage.personalinfo.tab']}">
                        <h:panelGrid  columns="3" cellpadding="10">
                            <h:outputLabel id="accountTouristNameLabel" value="#{bundle['myfoodsage.name.label']}" style="font-weight: bold"/>
                            <h:outputLabel id="name" value="#{touristViewMyFoodSageManagedBean.name}" />
                            <p:message for="username" />

                            <h:outputLabel id="accountTouristGenderLabel" value="#{bundle['myfoodsage.gender.label']}" style="font-weight: bold"/>
                            <h:outputLabel id="gender" value="#{touristViewMyFoodSageManagedBean.gender}" />
                            <p:message for="gender"/>

                            <h:outputLabel id="accountTouristBirthdateLabel" value ="#{bundle['myfoodsage.birthdate.label']}" style="font-weight: bold"/>
                            <h:outputText id="birthdate" value="#{touristViewMyFoodSageManagedBean.birthdate}" />
                            <p:message for="birthdate"/>

                            <h:outputLabel id="accountTouristCountryLabel" value ="#{bundle['myfoodsage.country.label']}" style="font-weight: bold"/>
                            <h:outputText id="country" value="#{touristViewMyFoodSageManagedBean.country}" />
                            <p:message for="country"/>
                            
                            <h:outputLabel id="accountTouristEmailLabel" value ="#{bundle['myfoodsage.email.label']}" style="font-weight: bold"/>
                            <h:outputText id="email" value="#{touristViewMyFoodSageManagedBean.email}" />
                            <p:message for="email"/>
                            
                            <h:outputLabel id="accountTouristEmailSecondaryLabel" value ="#{bundle['myfoodsage.emailSecondary.label']}" style="font-weight: bold"/>
                            <h:outputText id="emailSec" value="#{touristViewMyFoodSageManagedBean.emailSecondary}" />
                            <p:message for="emailSec"/>
                        </h:panelGrid>
                    </p:tab>

                    <p:tab id="tabTouristItineraryInfo" title="#{bundle['myfoodsage.myitineraries.tab']}">
                        <h:panelGrid columns="3" cellpadding="5">
                            Coming soon... =)
                        </h:panelGrid>
                    </p:tab>

                </p:tabView>
                
                <br/>
                <h:commandLink id="myFoodsageEditButton" value="#{bundle['myfoodsage.edit.button']}" action="EditMyFoodSage.xhtml" />
            </p:panel>
        </h:form>
    </h:body>
    </f:view>
</html>

